package com.myzhouye.biz.controller;/***
 *                    _ooOoo_
 *                   o8888888o
 *                   88" . "88
 *                   (| -_- |)
 *                    O\ = /O
 *                ____/`---'\____
 *              .   ' \\| |// `.
 *               / \\||| : |||// \
 *             / _||||| -:- |||||- \
 *               | | \\\ - /// | |
 *             | \_| ''\---/'' | |
 *              \ .-\__ `-` ___/-. /
 *           ___`. .' /--.--\ `. . __
 *        ."" '< `.___\_<|>_/___.' >'"".
 *       | | : `- \`.;`\ _ /`;.`/ - ` : | |
 *         \ \ `-. \_ __\ /__ _/ .-` / /
 * ======`-.____`-.___\_____/___.-`____.-'======
 *                    `=---='
 *
 * .............................................
 *          佛祖保佑             永无BUG
 */

import com.myzhouye.biz.bean.R;
import com.myzhouye.biz.dto.BaseWarehouse;
import com.myzhouye.biz.service.WarehouseService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: game01
 * @description: 仓库
 * @author: 那条蠢鱼
 * @create: 2025-09-30 10:01
 **/
@RestController
@RequestMapping("warehouse")
@Tag(name = "仓库")
@RequiredArgsConstructor
public class WarehouseController {
    private final WarehouseService warehouseService;

    @Operation(summary = "获取仓库信息")
    @GetMapping("info")
    public R<BaseWarehouse> getWarehouseInfo() {
        return R.ok(warehouseService.getWarehouse());
    }

    @Operation(summary = "新建仓库")
    @PostMapping("create")
    public R createWarehouse() {
        warehouseService.createWarehouse();
        return R.success();
    }
}
